<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title>智能订餐</title>
    <meta name="description" content="">
    <meta name="HandheldFriendly" content="True">
    <meta name="MobileOptimized" content="320">
    <meta name="viewport" content="width=device-width, initial-scale=1, minimal-ui, user-scalable=no">
    <meta http-equiv="cleartype" content="on">
    <meta name="format-detection" content="telephone=no">
    <link rel="stylesheet" href="/assets/base/Inforschool/css/style.css">
</head>
<body>
<div class="wraper">
    <div class="header font-white">
        <a href="javascript:history.go(-1)" class="iconfont icon-left font-white back"></a>
        <div class="font-16 text-center">智能订餐</div>
    </div>
    <div class="tab text-center font-gray1">
        <div class="tab-list extra">
            <p>校内实训</p>
        </div>
        <div class="tab-list">
            <p>校际接待</p>
        </div>
        <div class="tab-list">
            <p>校办接待</p>
        </div>
    </div>

    <div class="contain actived">
        <div class="js_title">
            <div class="padding-8-12">
                <span class="iconfont icon-dengdai font-gray1"></span>
                <span class="margin-l10">待完成</span>
            </div>
            <volist name="passorderdata1" id="v">
                <div class="detail bg_white">
                    <a href="kitchenDetail?id={BEESCRM:$v['or_sn']}"
                       class="  actived padding-6  font-gray1 border">
                        <div class="flex_between">
                            <div>
                                {BEESCRM:$v['dname']}
                            </div>
                            <div>
                                {BEESCRM:$v['create_time']}至{BEESCRM:$v['finish_time']}
                            </div>
                        </div>
                        <div>中餐/晚餐</div>
                        <div class="flex_between">
                            <div>总套餐份数</div>
                            <div>{BEESCRM:$v['num1']}份</div>
                        </div>

                    </a>
                    <div class=" padding-12 clearfix ">
                        <a href="#" class="btn_complete font-white pull-right"
                           data-or_sn="{BEESCRM:$v['or_sn']}">点击完成
                        </a>
                    </div>
                </div>
            </volist>
            <p class="js_none text-center font-gray2 font-12 padding-8-12 hide">暂无订单</p>
        </div>
        <div class="js_title">
            <div class="padding-8-12">
                <span class="iconfont icon-wancheng font-gray1"></span>
                <span class="margin-l10">已完成</span>
            </div>
            <volist name="finishorderdata1" id="v">
                <a href="kitchenDetail?id={BEESCRM:$v['or_sn']}" class="actived detail bg_white">
                    <div class="boxs padding-6  font-gray1 border">
                        <div class="flex_between">
                            <div>
                                {BEESCRM:$v['dname']}
                            </div>
                            <div>
                                {BEESCRM:$v['create_time']}至{BEESCRM:$v['finish_time']}
                            </div>
                        </div>
                        <div>中餐/晚餐</div>
                        <div class="flex_between">
                            <div>总套餐份数</div>
                            <div>{BEESCRM:$v['num1']}份</div>
                        </div>
                    </div>
                </a>
            </volist>
            <p class="js_none text-center font-gray2 font-12 padding-8-12 hide">暂无订单</p>
        </div>

    </div>

    <div class="contain">
        <div class="js_title">
            <div class="padding-8-12">
                <span class="iconfont icon-dengdai font-gray1"></span>
                <span class="margin-l10">待完成</span>
            </div>
            <volist name="passorderdata2" id="v">
                <div class="detail bg_white">
                    <a href="kitchenDetail?id={BEESCRM:$v['or_sn']}" class="actived padding-6  font-gray1 border">
                        <div class="flex_between">
                            <div>
                                {BEESCRM:$v['dname']}
                            </div>
                            <div>
                                {BEESCRM:$v['create_time']}至{BEESCRM:$v['finish_time']}
                            </div>
                        </div>
                        <div>中餐/晚餐</div>
                        <div class="flex_between">
                            <div>总套餐份数</div>
                            <div>{BEESCRM:$v['num1']}份</div>
                        </div>
                    </a>
                    <div class=" padding-12 clearfix">
                        <a href="#" class="btn_complete font-white pull-right"
                           data-or_sn="{BEESCRM:$v['or_sn']}">点击完成
                        </a>
                    </div>
                </div>
            </volist>
            <p class="js_none text-center font-gray2 font-12 padding-8-12 hide">暂无订单</p>
        </div>
        <div class="js_title">
            <div class="padding-8-12">
                <span class="iconfont icon-wancheng font-gray1"></span>
                <span class="margin-l10">已完成</span>
            </div>
            <volist name="finishorderdata2" id="v">
                <a href="kitchenDetail?id={BEESCRM:$v['or_sn']}" class="actived detail bg_white">
                    <div class="boxs padding-6  font-gray1 border">
                        <div class="flex_between">
                            <div>
                                {BEESCRM:$v['dname']}
                            </div>
                            <div>
                                {BEESCRM:$v['create_time']}至{BEESCRM:$v['finish_time']}
                            </div>
                        </div>
                        <div>中餐/晚餐</div>
                        <div class="flex_between">
                            <div>总套餐份数</div>
                            <div>{BEESCRM:$v['num1']}份</div>
                        </div>
                    </div>
                </a>
            </volist>
            <p class="js_none text-center font-gray2 font-12 padding-8-12 hide">暂无订单</p>
        </div>
    </div>

    <div class="contain">
        <div class="js_title">
            <div class="padding-8-12 ">
                <span class="iconfont icon-dengdai font-gray1"></span>
                <span class="margin-l10">待完成</span>
            </div>
            <volist name="passorderdata3" id="v">
                <div class="detail bg_white ">
                    <a href="kitchenDetail?id={BEESCRM:$v['or_sn']}" class="boxs padding-6  font-gray1 border actived">
                        <div class="flex_between">
                            <div>
                                {BEESCRM:$v['dname']}
                            </div>
                            <div>
                                {BEESCRM:$v['create_time']}至{BEESCRM:$v['finish_time']}
                            </div>
                        </div>
                        <div>中餐/晚餐</div>
                        <div class="flex_between">
                            <div>总套餐份数</div>
                            <div>{BEESCRM:$v['num1']}份</div>
                        </div>
                    </a>
                    <div class="boxs padding-12 clearfix">
                        <a href="#" class="btn_complete font-white pull-right"
                           data-or_sn="{BEESCRM:$v['or_sn']}">点击完成
                        </a>
                    </div>
                </div>
            </volist>
            <p class="js_none text-center font-gray2 font-12 padding-8-12 hide">暂无订单</p>
        </div>
        <div class="js_title">
            <div class="padding-8-12 ">
                <span class="iconfont icon-wancheng font-gray1"></span>
                <span class="margin-l10">已完成</span>
            </div>
            <volist name="finishorderdata3" id="v">
                <a href="kitchenDetail?id={BEESCRM:$v['or_sn']}" class="actived detail bg_white">
                    <div class="boxs padding-6  font-gray1 border">
                        <div class="flex_between">
                            <div>
                                {BEESCRM:$v['dname']}
                            </div>
                            <div>
                                {BEESCRM:$v['create_time']}至{BEESCRM:$v['finish_time']}
                            </div>
                        </div>
                        <div>中餐/晚餐</div>
                        <div class="flex_between">
                            <div>总套餐份数</div>
                            <div>{BEESCRM:$v['num']}份</div>
                        </div>
                    </div>
                </a>
            </volist>
            <p class="js_none text-center font-gray2 font-12 padding-8-12 hide">暂无订单</p>
        </div>
    </div>
    <div class="pop-box height text-center hide">
        <div class="pop-hint font-gray1">
            <div class="top_green"></div>
            <div>
                <p class="pop_title ">提示</p>
                <p class="pop_txt">确定已制作完成？</p>
            </div>
            <input type="hidden" id="or_sn">
            <div class="flex_between pop_bottom">
                <a href="#" class="pop_btn width-50">取消</a>
                <a href="#" class="pop_btn width-50 active" id="check">确定</a>
            </div>
        </div>
    </div>
</div>
</body>
<script src="/assets/base/Inforschool/js/jquery-2.1.0.min.js"></script>
<script>
    $('.tab').on('click', '.tab-list', function () {
        var idx = $(this).index();
        $('.contain').eq(idx).addClass('actived').siblings('.contain').removeClass('actived');
        $(this).addClass('extra').siblings('.tab-list').removeClass('extra');
    });

    $('.pop-box').on('click', '.pop_btn', function () {
        $('.pop-box').addClass('hide');
    });

    $(".btn_complete").click(function () {
        var or_sn = $(this).data('or_sn');
        $("#or_sn").val(or_sn);
        $('.pop-box').removeClass('hide');
    });
    $(document).on('click', '#check', function () {
        var data = {};
        var json = {};
        var or_sn = $("#or_sn").val().trim();
        data.or_sn = or_sn;
        $.ajax({
            url: 'orderPass2',
            type: 'post',
            data: data,
            dataType: 'json',
            success: function (result) {
                if (result.status == 'S') {
                    reload1();
                } else if (result.status == 'F') {
                    reload1();
                }
            }
        })

    })
    function reload1() {
        setTimeout('location.reload()', 3000);
    }

    $(function () {
        $('.js_title').each(function () {
            var leng = $(this).find('.detail').length;
            if (leng == 0) {
                $(this).find('.js_none').removeClass('hide');
            }
        })
    })
</script>
</html>